namespace Vin.Extension.Win32.Command.Node;

public interface INodeContext
{
    #region 当前节点数据

    public NodeGroup NodeInput { get; }

    /// <summary>
    /// 当前节点数据
    /// </summary>
    public NodeExecuteData CurrentNodeExecuteData { get; }

    public int Port { get; internal set; }

    internal List<int> HaveNotInputPort()
    {
        return NodeInput.InputNodeDict.Where(x => x.Value == false).Select(x => x.Key).ToList();
    }

    internal void ChangeInputPort() => NodeInput.InputNodeDict[Port] = true;

    internal string GetNodeIdByInputPort(int inputPort) => NodeInput.InputPort[inputPort];

    #endregion

    bool HaveNextNode => NodeInput.Next != null;
}